package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func main() {
	r := gin.Default()
	r.GET("/user/search", func(c *gin.Context) {
		username := c.DefaultQuery("username", "小王子")

		address := c.Query("address")

		c.JSON(http.StatusOK, gin.H{"message": "ok", "username": username, "address": address})

	})
	r.Run(":8081")
}
